import { applyMiddleware, legacy_createStore as createStore } from "redux"
import rootReducer from "./reducers/root.reducer"
import createsagaMiddleware from 'redux-saga'
import rootSaga from "./sagas/root.saga"

const sagaMiddleware = createsagaMiddleware()

const store = createStore(rootReducer,applyMiddleware(sagaMiddleware))
sagaMiddleware.run(rootSaga)


export default store